Optimal. Leaf size=497 \[ \frac{\sqrt{a+b x+c x^2} (-2 a h+x (2 c g-b h)+b g) \left (16 a^2 f h^2-4 c \left (a \left (d h^2-5 e g h+f g^2\right )+2 b g (2 d h+e g)\right )-8 a b h (e h+2 f g)+b^2 \left (5 d h^2+3 e g h+5 f g^2\right )+16 c^2 d g^2\right )}{64 (g+h x)^2 \left (a h^2-b g h+c g^2\right )^3}-\frac{\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (16 a^2 f h^2-4 c \left (a \left (d h^2-5 e g h+f g^2\right )+2 b g (2 d h+e g)\right )-8 a b h (e h+2 f g)+b^2 \left (5 d h^2+3 e g h+5 f g^2\right )+16 c^2 d g^2\right )}{128 \left (a h^2-b g h+c g^2\right )^{7/2}}+\frac{\left (a+b x+c x^2\right )^{3/2} \left (h \left (8 a h (2 f g-e h)-b \left (-5 d h^2-3 e g h+11 f g^2\right )\right )+2 c g \left (h (e g-5 d h)+3 f g^2\right )\right )}{24 h (g+h x)^3 \left (a h^2-b g h+c g^2\right )^2}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{4 h (g+h x)^4 \left (a h^2-b g h+c g^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.85545, antiderivative size = 499, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.156, Rules used = {1650, 806, 720, 724, 206} \[ \frac{\sqrt{a+b x+c x^2} (-2 a h+x (2 c g-b h)+b g) \left (16 a^2 f h^2-4 c \left (-a h (5 e g-d h)+a f g^2+2 b g (2 d h+e g)\right )-8 a b h (e h+2 f g)+b^2 \left (h (5 d h+3 e g)+5 f g^2\right )+16 c^2 d g^2\right )}{64 (g+h x)^2 \left (a h^2-b g h+c g^2\right )^3}-\frac{\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (16 a^2 f h^2-4 c \left (-a h (5 e g-d h)+a f g^2+2 b g (2 d h+e g)\right )-8 a b h (e h+2 f g)+b^2 \left (h (5 d h+3 e g)+5 f g^2\right )+16 c^2 d g^2\right )}{128 \left (a h^2-b g h+c g^2\right )^{7/2}}+\frac{\left (a+b x+c x^2\right )^{3/2} \left (8 a h^2 (2 f g-e h)-b h \left (11 f g^2-h (5 d h+3 e g)\right )+2 c g h (e g-5 d h)+6 c f g^3\right )}{24 h (g+h x)^3 \left (a h^2-b g h+c g^2\right )^2}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{4 h (g+h x)^4 \left (a h^2-b g h+c g^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1650
Rule 806
Rule 720
Rule 724
Rule 206
Rubi steps
\begin{align*} \int \frac{\sqrt{a+b x+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^5} \, dx &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{4 h \left (c g^2-b g h+a h^2\right ) (g+h x)^4}-\frac{\int \frac{\left (\frac{1}{2} \left (-8 c d g+3 b e g+8 a f g-\frac{3 b f g^2}{h}+5 b d h-8 a e h\right )-\left (c e g-4 b f g+\frac{3 c f g^2}{h}-c d h+4 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{(g+h x)^4} \, dx}{4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{4 h \left (c g^2-b g h+a h^2\right ) (g+h x)^4}+\frac{\left (6 c f g^3+2 c g h (e g-5 d h)+8 a h^2 (2 f g-e h)-b h \left (11 f g^2-h (3 e g+5 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{24 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^3}+\frac{\left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right ) \int \frac{\sqrt{a+b x+c x^2}}{(g+h x)^3} \, dx}{16 \left (c g^2-b g h+a h^2\right )^2}\\ &=\frac{\left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{64 \left (c g^2-b g h+a h^2\right )^3 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{4 h \left (c g^2-b g h+a h^2\right ) (g+h x)^4}+\frac{\left (6 c f g^3+2 c g h (e g-5 d h)+8 a h^2 (2 f g-e h)-b h \left (11 f g^2-h (3 e g+5 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{24 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^3}-\frac{\left (\left (b^2-4 a c\right ) \left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{128 \left (c g^2-b g h+a h^2\right )^3}\\ &=\frac{\left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{64 \left (c g^2-b g h+a h^2\right )^3 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{4 h \left (c g^2-b g h+a h^2\right ) (g+h x)^4}+\frac{\left (6 c f g^3+2 c g h (e g-5 d h)+8 a h^2 (2 f g-e h)-b h \left (11 f g^2-h (3 e g+5 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{24 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^3}+\frac{\left (\left (b^2-4 a c\right ) \left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac{-b g+2 a h-(2 c g-b h) x}{\sqrt{a+b x+c x^2}}\right )}{64 \left (c g^2-b g h+a h^2\right )^3}\\ &=\frac{\left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right ) (b g-2 a h+(2 c g-b h) x) \sqrt{a+b x+c x^2}}{64 \left (c g^2-b g h+a h^2\right )^3 (g+h x)^2}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{4 h \left (c g^2-b g h+a h^2\right ) (g+h x)^4}+\frac{\left (6 c f g^3+2 c g h (e g-5 d h)+8 a h^2 (2 f g-e h)-b h \left (11 f g^2-h (3 e g+5 d h)\right )\right ) \left (a+b x+c x^2\right )^{3/2}}{24 h \left (c g^2-b g h+a h^2\right )^2 (g+h x)^3}-\frac{\left (b^2-4 a c\right ) \left (16 c^2 d g^2+16 a^2 f h^2-8 a b h (2 f g+e h)-4 c \left (a f g^2-a h (5 e g-d h)+2 b g (e g+2 d h)\right )+b^2 \left (5 f g^2+h (3 e g+5 d h)\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b g h+a h^2} \sqrt{a+b x+c x^2}}\right )}{128 \left (c g^2-b g h+a h^2\right )^{7/2}}\\ \end{align*}
Mathematica [A] time = 4.79482, size = 447, normalized size = 0.9 \[ \frac{\frac{\frac{3}{2} c h \left (\frac{\left (b^2-4 a c\right ) \tanh ^{-1}\left (\frac{2 a h-b g+b h x-2 c g x}{2 \sqrt{a+x (b+c x)} \sqrt{h (a h-b g)+c g^2}}\right )}{8 \left (h (a h-b g)+c g^2\right )^{3/2}}+\frac{\sqrt{a+x (b+c x)} (-2 a h+b (g-h x)+2 c g x)}{4 (g+h x)^2 \left (h (a h-b g)+c g^2\right )}\right ) \left (16 a^2 f h^2-4 c \left (a h (d h-5 e g)+a f g^2+2 b g (2 d h+e g)\right )-8 a b h (e h+2 f g)+b^2 \left (h (5 d h+3 e g)+5 f g^2\right )+16 c^2 d g^2\right )+\frac{c (a+x (b+c x))^{3/2} \left (-8 a h^2 (e h-2 f g)+b h \left (h (5 d h+3 e g)-11 f g^2\right )+2 c g h (e g-5 d h)+6 c f g^3\right )}{(g+h x)^3}}{24 \left (h (a h-b g)+c g^2\right )^2}+\frac{(a+x (b+c x))^{3/2} \left (4 f h (a h-b g)+c h (e g-d h)+3 c f g^2\right )}{4 (g+h x)^4 \left (h (a h-b g)+c g^2\right )}-\frac{f (a+x (b+c x))^{3/2}}{(g+h x)^4}}{c h} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.284, size = 29161, normalized size = 58.7 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]